#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {

    int a, b = 0;
    scanf("%d %d", &a, &b);
    int arr[10][10];
    for (int i = 0; i < a; i++)
    {
        for (int j = 0; j < b; j++)
        {
            scanf("%d", &arr[i][j]);
        }
    }
    int c, d = 0;
    scanf("%d %d", &c, &d);
    printf("%d", arr[c - 1][d - 1]);
    return 0;
}